]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Bump save timeout to 5 minutes, close output asynchronously
authorColin Walters <walters@verbum.org>
Fri, 20 Nov 2009 01:15:46 +0000 (20:15 -0500)
committerDan Winship <danw@gnome.org>
Tue, 24 Nov 2009 18:22:32 +0000 (13:22 -0500)
The synchronous close causes us to block in fsync() which has extremely
poor interactivity implications on ext3.

Also, the 5 second timeout was an accidental commit from debugging, 5
minutes is fine.

https://bugzilla.gnome.org/show_bug.cgi?id=602456

src/shell-app-usage.c

index c17c3d2077f3e7d15a6b0ca7317cefd23c2b2cc7..00a6c2ee5cf5dcae8ead3dc7c95f9855baf13e3d 100644 (file)
@@ -65,7 +65,7 @@
  */
 
 /* How often we save internally app data, in seconds */
-#define SAVE_APPS_TIMEOUT_SECONDS 5    /* leave this low for testing, we can bump later if need be */
+#define SAVE_APPS_TIMEOUT_SECONDS (5 * 60)
 
 /* With this value, an app goes from bottom to top of the
  * usage list in 50 hours of use */
@@ -714,7 +714,7 @@ idle_save_application_usage (gpointer data)
 
 out:
   if (!error)
-    g_output_stream_close (G_OUTPUT_STREAM(data_output), NULL, &error);
+    g_output_stream_close_async (G_OUTPUT_STREAM (data_output), 0, NULL, NULL, NULL);
   g_object_unref (data_output);
   if (error)
     {